package com.vanke.kotlin

import android.app.Application

/**
 * @name Kotlin
 * @package name：com.vanke.kotlin
 * @class describe
 * @anthor shiyuchuan
 * @time 2017/7/24 10:03
 */

//class App : Application(){
//    companion object {
//        private var instance: Application? = null
//        fun instance() = instance!!
//    }
//
//    override fun onCreate() {
//        super.onCreate()
//        instance = this
//    }
//}

class App : Application(){
    companion object {
//        var instance: App by Delegates.notNull()
        var instance: App by DelegateExt.notNullSingleValueVar()
    }

    override fun onCreate() {
        super.onCreate()
        instance = this
    }
}